<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>VANS后台管理系统</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="./content/ui/global/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="./content/ui/global/font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="./content/adminlte/dist/css/AdminLTE.css">
    <link rel="stylesheet" href="./content/adminlte/dist/css/skins/_all-skins.css">
    <link href="./content/min/css/supershopui.common.min.css" rel="stylesheet" />
    <link href="./content/ui/img/favicon.ico" rel="shortcut icon" />
    <style type="text/css">
         html {
            overflow: hidden;
        }
    </style>
</head>
<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
    <!-- Logo -->
    <a href="" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini"><b>VANS</b></span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg"><b>VANS后台管理系统</b></span>
    </a>

    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top" role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">切换导航</span>
        </a>

        <!-- Navbar Right Menu -->
        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <!-- Notifications Menu -->
                <!--<li class="dropdown notifications-menu">
                    &lt;!&ndash; Menu toggle button &ndash;&gt;
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-bell-o"></i>
                        <span class="label label-warning">10</span>
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header">你有10条消息</li>
                        <li>
                            &lt;!&ndash; Inner Menu: contains the notifications &ndash;&gt;
                            <ul class="menu">
                                <li>
                                    &lt;!&ndash; start notification &ndash;&gt;
                                    <a href="#">
                                        <i class="fa fa-users text-aqua"></i> 新用户注册!
                                    </a>
                                </li>
                                &lt;!&ndash; end notification &ndash;&gt;
                            </ul>
                        </li>
                        <li class="footer"><a href="#">查看所有</a></li>
                    </ul>
                </li>-->

                <!-- User Account Menu -->
                <li class="dropdown user user-menu">
                    <!-- Menu Toggle Button -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <!-- The user image in the navbar-->
                        <img src="./content/ui/img/photos/girl4.png" class="user-image" alt="User Image">
                        <!-- hidden-xs hides the username on small devices so only the image appears. -->
                        <span class="hidden-xs" id="name"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- The user image in the menu -->
                        <li class="user-header">
                            <img src="./content/ui/img/photos/girl4.png" class="img-circle" alt="User Image">
                            <p id="pname">
                                <small>2016年注册</small>
                            </p>
                        </li>
                        <!-- Menu Body -->
                        <li class="user-body">
                            <div class="row">
                                <div class="col-xs-4 text-center">
                                    <a href="#">个人信息</a>
                                </div>
                                <div class="col-xs-4 text-center">
                                    <a href="#">设置</a>
                                </div>
                                <div class="col-xs-4 text-center">
                                    <a href="#">主题</a>
                                </div>
                            </div>
                            <!-- /.row -->
                        </li>
                        <!-- Menu Footer-->
                        <li class="user-footer">
                            <div class="pull-left">
                                <a href="#" onclick="updatePassword()" class="btn btn-default btn-flat">修改密码</a>
                            </div>
                            <div class="pull-right">
                                <a href="#" onclick="logout()" class="btn btn-default btn-flat">退出</a>
                            </div>
                        </li>
                    </ul>
                </li>
                <!-- Control Sidebar Toggle Button -->
                <li>
                    <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                </li>
            </ul>
        </div>
    </nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel (optional) -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="./content/ui/img/photos/girl4.png" class="img-circle" alt="用户头像">
            </div>
            <div class="pull-left info">
                <p id="aname"></p>
                <!-- Status -->
                <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
            </div>
        </div>
        <!-- Sidebar Menu -->
        <ul class="sidebar-menu">

        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"  id="content-wrapper">
    <div class="content-tabs">
        <button class="roll-nav roll-left tabLeft" onclick="scrollTabLeft()">
            <i class="fa fa-backward"></i>
        </button>
        <nav class="page-tabs menuTabs tab-ui-menu" id="tab-menu">
            <div class="page-tabs-content" style="margin-left: 0px;">

            </div>
        </nav>
        <button class="roll-nav roll-right tabRight" onclick="scrollTabRight()">
            <i class="fa fa-forward" style="margin-left: 3px;"></i>
        </button>
        <div class="btn-group roll-nav roll-right">
            <button class="dropdown tabClose" data-toggle="dropdown">
                页签操作<i class="fa fa-caret-down" style="padding-left: 3px;"></i>
            </button>
            <ul class="dropdown-menu dropdown-menu-right" style="min-width: 128px;">
                <!-- <li><a class="tabReload" href="javascript:refreshTab();">刷新当前</a></li> -->
                <li><a class="tabCloseCurrent" href="javascript:closeCurrentTab();">关闭当前</a></li>
                <li><a class="tabCloseAll" href="javascript:closeOtherTabs(true);">全部关闭</a></li>
                <li><a class="tabCloseOther" href="javascript:closeOtherTabs();">除此之外全部关闭</a></li>
            </ul>
        </div>
        <button class="roll-nav roll-right fullscreen" ><i class="fa fa-arrows-alt"></i></button>
    </div>
    <div class="content-iframe " style="background-color: #ffffff; ">
        <div class="tab-content " id="tab-content">

        </div>
    </div>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->

<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
    <!-- Create the tabs -->
    <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
       <!--  <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
        <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li> -->
    </ul>
    <!-- Tab panes -->
    <div class="tab-content">
        <!-- Home tab content -->
        <div class="tab-pane" id="control-sidebar-home-tab">
        </div>
        <!-- /.tab-pane -->
        <!-- Stats tab content -->
        <div class="tab-pane" id="control-sidebar-stats-tab">状态面板设置</div>
        <!-- /.tab-pane -->
        <!-- Settings tab content -->
        <div class="tab-pane" id="control-sidebar-settings-tab">

        </div>
        <!-- /.tab-pane -->
    </div>
</aside>
<div class="control-sidebar-bg"></div>
</div>
  <script src="./content/ui/global/jQuery/jquery.min.js"></script>
    <!-- Bootstrap 3.3.6 -->
  <script src="./config/index.js"></script>
	<script src="./content/ui/global/bootstrap/js/bootstrap.min.js"></script>
  <script src="./content/min/js/supershopui.common.js"></script>

<script type="text/javascript">

	$(function(){
    addTabs(({ id: '10008', title: '欢迎页', close: false, url: '/#/index' }));
    App.fixIframeCotent();
		$.ajax({
      type: 'GET',
      url: BaseUrl + '/auth/menu/nav',
      dataType: "json",
      contentType:"application/json",
      data:{},
      success:function(data){
        var menus = data;
        $('.sidebar-menu').sidebarMenu({ data: menus, param: { strUser: 'admin' } });
      },
      beforeSend: setHeader
    });
		//获取用户信息
    $.ajax({
      type: 'GET',
      url: BaseUrl + '/auth/user/info',
      dataType: "json",
      contentType:"application/json",
      data:{},
      success:function(data){
        var para = {id: data.id, loginName: data.loginName, name: data.name, companyCode: data.companyCode, companyName: data.companyName, mobile: data.mobile};
        sessionStorage.setItem("user_info", JSON.stringify(para));
        $("#name").text(data.name);
        $("#pname").text(data.name);
        $("#aname").text(data.name);
      },
      beforeSend: setHeader
    });
	});

	//修改密码
  function updatePassword(){
    addTabs(({ id: '10009', title: '修改密码', close: true, url: '/#/updatePassword' }));
  }

	//退出登陆
  function logout(){
    $.ajax({
      type: 'DELETE',
      url: BaseUrl + '/auth/token',
      dataType: "text",
      contentType:"application/json",
      data:{},
      success:function(data){
        sessionStorage.removeItem( "token" );
        },
        beforeSend: setHeader
    });
    window.location.href= AppPath + "/static/login.html";
  }


</script>
</body>
</html>
